<?php

class Application_Model_Friendlist
{
	protected $_id;
	protected $_userid;
	protected $_friendid;
	protected $_akzeptiert;
	protected $_created;
	protected $_usersichtbar;
	protected $_friendsichtbar;

	public function __construct (array $options = null)
	{
		if (is_array($options))
		{
			$this->setOptions($options);
		}
	}
	public function setOptions (array $options)
	{
		$methods = get_class_methods($this);
		foreach ($options as $key => $value)
		{
			$method = 'set' . ucfirst($key);
			if (in_array($method, $methods))
			{
				$this->$method($value);
			}
		}
		return $this;
	}

	public function __set ($name, $value)
	{
		$method = 'set' . ucfirst($name);
		if (('mapper' == $name) || ! method_exists($this, $method))
		{
			throw new Exception('Invalid auth property');
		}
		$this->$method($value);
	}
	
	public function __get ($name)
	{
		$method = 'get' . ucfirst($name);
		if (('mapper' == $name) || ! method_exists($this, $method))
		{
			throw new Exception('Invalid auth property');
		}
		return $this->$method();
	}
	public function getId() {
		return $this->_id;
	}

	public function getUserid() {
		return $this->_userid;
	}

	public function getFriendid() {
		return $this->_friendid;
	}

	public function getAkzeptiert() {
		return $this->_akzeptiert;
	}

	public function getCreated() {
		return $this->_created;
	}

	public function setId($_id) {
		$this->_id = $_id;
	}

	public function setUserid($_userid) {
		$this->_userid = $_userid;
	}

	public function setFriendid($_friendid) {
		$this->_friendid = $_friendid;
	}

	public function setAkzeptiert($_akzeptiert) {
		$this->_akzeptiert = $_akzeptiert;
	}

	public function setCreated($_created) {
		$this->_created = $_created;
	}
	public function getUsersichtbar() {
		return $this->_usersichtbar;
	}

	public function getFriendsichtbar() {
		return $this->_friendsichtbar;
	}

	public function setUsersichtbar($_usersichtbar) {
		$this->_usersichtbar = $_usersichtbar;
	}

	public function setFriendsichtbar($_friendsichtbar) {
		$this->_friendsichtbar = $_friendsichtbar;
	}


	
	
}